<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>保险违约金扣除记录表 管理</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<form id="insFeeDeductRec_form">
    <div class="fieldset1 tabel_col tabel_col_1 clearFix">
        
<div class="fieldBox col_100">
	<div class="label">客户ID</div>
	<div class="field">
		<input name="cstId" id="cstId" type="text" class="ui-textbox" value="${insFeeDeductRecVO.cstId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">客户名称</div>
	<div class="field">
		<input name="cstNm" id="cstNm" type="text" class="ui-textbox" value="${insFeeDeductRecVO.cstNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">支付表ID</div>
	<div class="field">
		<input name="paySchId" id="paySchId" type="text" class="ui-textbox" value="${insFeeDeductRecVO.paySchId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">支付表号</div>
	<div class="field">
		<input name="paySchNo" id="paySchNo" type="text" class="ui-textbox" value="${insFeeDeductRecVO.paySchNo}" validate="{required:true,maxlength:30}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">PRJ_PRD_PAY_SCH_D表主键ID</div>
	<div class="field">
		<input name="paySchDId" id="paySchDId" type="text" class="ui-textbox" value="${insFeeDeductRecVO.paySchDId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">费用类型(CAP0018)  02.客户保证金 11.保险保证金 </div>
	<div class="field">
		<select name="feeTypCd" id="feeTypCd" data-value="${insFeeDeductRecVO.feeTypCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${feeTypCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保证金处理方式（CAP0017） 1.期末退回 2.期末冲抵 3.平均冲抵 4.扣除 5.已转出 6.脱保扣除</div>
	<div class="field">
		<select name="handleWayCd" id="handleWayCd" data-value="${insFeeDeductRecVO.handleWayCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${handleWayCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">转出金额（分）</div>
	<div class="field">
		<input name="deductAmt" id="deductAmt" type="text" class="ui-textbox" value="${insFeeDeductRecVO.deductAmt}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">转出时间</div>
	<div class="field">
		<input name="deductDt" id="deductDt" type="text" class="ui-textbox" value="${insFeeDeductRecVO.deductDt}" validate="{required:true,maxlength:0}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">备注</div>
	<div class="field">
		<textarea name="deductRem" id="deductRem" type="text" class="ui-textbox" cols="25" rows="4" value="${insFeeDeductRecVO.deductRem}" validate="{required:false,maxlength:300}">${insFeeDeductRecVO.deductRem}</textarea>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保单ID</div>
	<div class="field">
		<input name="plcId" id="plcId" type="text" class="ui-textbox" value="${insFeeDeductRecVO.plcId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">状态:1. 已扣除 2.转正常中  3.已转正常</div>
	<div class="field">
		<select name="deductStsCd" id="deductStsCd" data-value="${insFeeDeductRecVO.deductStsCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${deductStsCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保单止保时间</div>
	<div class="field">
		<input name="plcEndTm" id="plcEndTm" type="text" class="ui-textbox" value="${insFeeDeductRecVO.plcEndTm}" validate="{required:true,maxlength:0}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保单性质INS0003：1首年保单2续保保单</div>
	<div class="field">
		<select name="plcPropCd" id="plcPropCd" data-value="${insFeeDeductRecVO.plcPropCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${plcPropCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
    </div>
    <div class="btnsBox">
        <span id="saveInsFeeDeductRec_Btn" class="sq-button sq-button-round l-dialog-btn-ok">保存</span>
        <input type="reset" id="resetBtn" class="l-button l-button-reset Hide">
    </div>
</form>
<script>
    $(function() {
        var insFeeDeductRecId = "${insFeeDeductRecVO.id}";//主键ID
        $("#insFeeDeductRec_form").ligerForm({
            validate: true
        });
        /*保存*/
        $("#saveInsFeeDeductRec_Btn").click(function (event) {
            var form = liger.get("insFeeDeductRec_form");
            if (!form.valid()) {
                $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO, SQ_type: "warning"});
                return false; //验证不通过，不执行以下代码
            }
            var data = form.getData();
            $.ligerDialog.hide();
            var _url;
            if (insFeeDeductRecId == '') {//新增
                _url = '<%=path%>/insurance/insFeeDeductRec/add.do';
            } else {//修改
                _url = '<%=path%>/insurance/insFeeDeductRec/modify.do?id=' + insFeeDeductRecId;
            }
            var wait_dialog;
            $.ajax({
                type: 'post',
                dataType: 'json',
                data: data,
                url: _url,
                beforeSend: function () {
                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                },
                success: function (msg) {
                    wait_dialog.close();
                    if (msg.success == 1) {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        parent.$("#clearBtn").click();
                        parent.$("#searchBtn").click();
                        frameElement.dialog.close();
                        
                        //$("#resetBtn").click();
                        //回调刷新列表
                        //var callback=frameElement.W2W.callback;
                        //Remove_navTab();
                        //callback();
                    } else {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                    }
                }
            });
        });
    });
</script>
</body>
</html>
